/*
 *  Copyright 2013 HCIWriter
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package com.hci.writer.shared.tasks;

import java.util.ArrayList;

import com.hci.writer.shared.Shuffle;
import com.hci.writer.shared.Task;
import com.hci.writer.shared.Taskgroup;
import com.hci.writer.shared.Taskset;
import com.hci.writer.shared.tasks.copy.CopyGroupA;
import com.hci.writer.shared.tasks.create.CreateGroupA;
import com.hci.writer.shared.tasks.edit.EditGroupA;

public class TasksetA extends Taskset {
	
	private ArrayList<Taskgroup> taskgroups = new ArrayList<Taskgroup>();
	
	public TasksetA() {
		this.taskgroups.add(new CopyGroupA());
		this.taskgroups.add(new CreateGroupA());
		this.taskgroups.add(new EditGroupA());
		
		Shuffle.shuffle(this.taskgroups);
	}

	@Override
	public ArrayList<Task> getTasks() {
		ArrayList<Task> result = new ArrayList<Task>();
		
		for(Taskgroup tg : this.taskgroups) {
			result.addAll(tg.getTasks());
		}
		
		return result;
	}

}
